﻿@model BudgetMealsModels.Entities.Recipe
<div style="width: 100%; clear: both;">
    <h3>Comments</h3>
    @{
        if (Model.Comments != null)
        {
            <div id="Reviews">
            @foreach (var comment in Model.Comments)
            {
                if(comment.ParentID == 0 && comment.Review != ""){
                    Html.RenderPartial("../Comment/ShowReview", comment);
                }
            }
            </div>
        }
        <div style="margin-top: 25px;">
            <h4>Add Comment</h4>
            @{
                Session["Redirect"] = Request.Url.PathAndQuery;
                Html.RenderAction("Create", "Comment", new { id = 0, recipeId = Model.RecipeID });
            }
        </div>
    }
</div>